<?php /*?><?php 
echo '<pre>';
print_r($result);
echo '</pre>';<?php */?>

<?php 
foreach($result as $key => $kq)
{
	$time1 = substr($kq['DateCreated'],0,10);
	$time2 = substr($kq['DateCreated'],11,8);
	$kq['DateCreated'] = $time1.' '. $time2;
	$time3 = substr($kq['modify'],0,10);
	$time4 = substr($kq['modify'],11,8);
	$kq['modify'] = $time3.' '. $time4;
			?>

<div class="page-header">
  <h1><?php echo $kq['Title']?></h1>
</div>
<!-- Single Page -->
<div class="page">
  <p> <i class="icon-map-marker"></i> <b>Vị trí:</b> <?php echo $kq['Address']?> || 
      <i class="icon-time"></i> <b>Lúc :</b> <?php echo $kq['DateCreated']?> || 
      <i class="icon-tags"></i> <b>Chỉnh sửa lần cuối :</b> <?php echo $kq['modify']?> 
  </p>
  <!--  Noi Dung -->
  <div class="row-fluid">
    <p><?php echo $kq['Summary']?></p>
    <?php foreach($kq['PlaceImages'] as $image)
	{
		?>
    <p style="text-align:center"><img class="image_blog" src="<?php echo $image;?>" /></p>
     <?php }?>
    <p><?php echo $kq['Description']?></p>
  </div>
  <!-- End Noi Dung -->
  <?php
}

?>
</div>
<hr class="dotted">
<!--  Comment -->
<div class="row-fluid">
  <div class="input_comment">
    <form id="comment">
    	<input type="text" id="name_cm" placeholder="Tên của bạn" /> <br />
      	<textarea id="comment_content"  style="resize: none; width: 500px; height: 75px" placeholder="Ý kiến của bạn"></textarea>
      <div id="confirm_comment">
        <input type="button" class="btn" value="Gửi"  />
      </div>
    </form>
  </div>
</div>
<?php 
	foreach($comment as $cm)
	{
		foreach($cm as $binhluan)
		{
			if($binhluan['status']=='true')
			{
				$binhluan['modify'] = substr($binhluan['modify'],0,10).' '.substr($binhluan['modify'],11,8);
				$name_cm = array(json_decode(file_get_contents('http://egov047.juddy.vn/api/user/getbyid?userid='.$binhluan['UserId']),true));
					foreach($name_cm as $name)
					{
?>
<div class ="row-fluid" >
  <div class ="comment" style=" margin-bottom: 10px; border-bottom: 1px double #ddd;">
    <div class="name_comment" style="font-size: 14px; font-weight: bold;"> <i class="icon-comments"></i> <?php echo $name['UserName']?> </div>
    <div class="content_comment" style="margin-left: 20px;"> <?php echo $binhluan['Content']?> </div>
    <div style="text-align:right"><i class="icon-time"></i> <?php echo $binhluan['modify']?> </div>
  </div>
</div>
<div class ="row-fluid" >
  <div class ="comment" style=" margin-bottom: 10px; border-bottom: 1px double #ddd;">
    <div class="name_comment" style="font-size: 14px; font-weight: bold;"> <i class="icon-comments"></i> <?php echo $name['UserName']?> </div>
    <div class="content_comment" style="margin-left: 20px;"> <?php echo $binhluan['Content']?> </div>
    <div style="text-align:right"><i class="icon-time"></i> <?php echo $binhluan['modify']?> </div>
  </div>
</div>
<?php } } } }?>
<!--  End Comment --> 
<!-- End Single Page -->